<!DOCTYPE html>
<head lang="zh_CN">
    <meta charset="UTF-8">
    <link rel="stylesheet" href="__PUBLIC__/yksui/css/zui.css" rel="stylesheet"/>
    <title></title>
</head>
<body>
<div style="margin-left: 20px;color: red;"><botton onclick="print_prepackage(this)" class="btn btn-lg btn-success">打印</botton>
    <b>注意：此页面最好用谷歌浏览器操作，当SKU个数多时，要等页面加载完毕（页面不再转圈圈），确定打印设置是否是纵向并且预览都出来了，再打印拣货单。</b>
</div>
<volist name="data" id="vo">

<div class="panel container page" >
    <h4 class="text-primary text-center">{$vo.shipmentid}拣货单</h4>
    <table width="98%" class="table table-striped  table-hover">
        <tbody>
        <tr height="30">
            <td width="25%">Shipmentid：{$vo.shipmentid}</td>
            <td width="25%">创建人：{$vo.create_user_id}</td>
            <td width="25%">创建时间：{$vo.create_time}</td>
            <td width="25%">销售员：{$vo.push_warehouse_user_id}</td>
        </tr>
        </tbody>
    </table>
    <table width="98%" class="table table-striped  table-hover">
        <tbody>
        <tr height="30">
            <td>账号：{$vo.account_name}<br /></td>
            <td>站点：{$vo.site_id}</td>
            <td>备注：{$vo.remark}</td>
            <td>亚马逊配送中心地址:{$vo.ship_to_address_id}</td>
        </tr>
        </tbody>
    </table>
    <table class="table table-border" >
        <thead>
        <tr>
            <th width="2%">序号</th>
            <th width="5%">SKU编码</th>
            <th width="10%">中文名称</th>
            <th width="9%">图片</th>
            <th width="15%">title</th>
            <th width="13%">储位</th>
            <th width="2%">数量</th>
            <th width="4%">是否退税</th>
            <th width="10%">公司主体</th>
            <th width="10%">亚马逊配送网络sku</th>
            <th width="20%">条形码</th>
        </tr>
        </thead>
        <tbody>
        <volist name="vo.detail" id="val" key="number">
            <tr>
                <td>{$number}</td>
                <td>{$val.sku}</td>
                <td><p style=" word-wrap: break-word;word-break : break-all; ">{$val.sku_name}</p></td>
                <td><image src="{$val.image_url}"/></td>
                <td><p style=" word-wrap: break-word;word-break : break-all; ">{$val.title}</p></td>
                <td><p style=" word-wrap: break-word;word-break : break-all; ">{$val.position}</p></td>
                <td>{$val.quantity}</td>
                <th>{$val.export_tax_rebate}</th>
                <th>{$val.enterprise_dominant}</th>
                <td>{$val.fnsku}</td>
                <td><img src="__ROOT__/ThinkPHP/Library/Vendor/barcode/html/image.php?filetype=PNG&dpi=300&scale=1&rotation=0&font_family=Arial.ttf&font_size=8
                                    &text={$val.sku}&thickness=22&start=A&code=BCGcode128" alt="barcode" style="width: 55mm;height: 6.9mm;"/></td>
            </tr>
        </volist>
        <tr>
            <td colspan="8"><b>SKU总数：{$number}</b></td>
        </tr>
        </tbody>
    </table>
</div><br/>
    <div style="page-break-after: always"></div>
</volist>
<input type="hidden" name="ids" id="ids" value="{$ids}">
<script src="__PUBLIC__/javascripts/admin/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="__PUBLIC__//javascripts/admin/layer/layer.js" type="text/javascript"></script>
<script>
    /*$(function(){
         var str = "<?php if(isset($log)){echo $log;}?>";
         if(str!=''){
         layer.msg(str);return;
         }
     })*/
    $(function(){
        var str = "<?php if(isset($log)){echo $log;}?>";
        if(str!=''){
            alert(str);
            window.close();
        }
    })

   function print_prepackage(thisObj)
    {
        var ids = $('#ids').val();
        $.ajax({
            url: "{:U('Inboundshipmentplan/updatePrint')}",
            type: 'post',
            async: true,
            data: {
                'id':ids
            },
            dataType: 'json',
            success: function (data) {
                if(data==1){
                    thisObj.parentNode.style.display='none';
                    window.print();
                    thisObj.parentNode.style.display='block';
                    if(confirm("打印成功，确认返回吗"))
                        top.window.location.href = 'index';
                }

            }
        })

    }


</script>
</body>
</html>

